wayland: avoid an unnecessary g_list_length call
authorMohammed Sadiq <sadiq@sadiqpk.org>
Tue, 17 Jan 2017 02:36:46 +0000 (08:06 +0530)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 17 Jan 2017 02:42:05 +0000 (21:42 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=777363

gdk/wayland/gdkdisplay-wayland.c

index d1f6e4e6d9b5d8e2ee7f158518207c4f5eec1ad4..47805467e72126c3a577a9ef39c7eb772d90bb53 100644 (file)
@@ -552,7 +552,7 @@ _gdk_wayland_display_open (const gchar *display_name)
 
   /* Wait for initializing to complete. This means waiting for all
    * asynchrounous roundtrips that were triggered during initial roundtrip. */
-  while (g_list_length (display_wayland->async_roundtrips) > 0)
+  while (display_wayland->async_roundtrips != NULL)
     {
       if (wl_display_dispatch (display_wayland->wl_display) < 0)
         {